package tech.aistar.service.comment.Impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tech.aistar.entity.Comment;
import tech.aistar.mapper.comment.CommentMapper;
import tech.aistar.service.comment.ICommentService;

import java.util.List;

/**
 * Created by Administrator on 2019/9/27 0027.
 */
@Service
@Transactional
public class CommentServiceImpl implements ICommentService {
    @Autowired
    private CommentMapper commentMapper;
    @Override
    public List<Comment> comFindAll() {
        List<Comment> commentList = commentMapper.comFindAll();
        return commentList;
    }

    @Override
    public List<Comment> comFindOne(Integer level) {
        List<Comment> commentList2 = commentMapper.comFindOne(level);
        return commentList2;
    }

    @Override
    public void comdelById(Integer id) {
        commentMapper.comdelById(id);
    }

    @Override
    public List<Comment> comFindser(Integer serviceId) {
        List<Comment> commentList3 = commentMapper.comFindser(serviceId);
        return commentList3;
    }

    @Override
    public Integer comCounts(Integer id) {
        commentMapper.comCounts(id);
        return id;
    }
    @Override
    public Comment praiseSave(Comment comment) {
        commentMapper.praiseSave(comment);
        return comment;
    }
}
